<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-form ref="form" :model="process_info" :rules="rules" label-width="100px" id="mvcfm">
          <el-button @click="gotoPage('/mes/product/ProductProDetUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
          <el-button @click="gotoPage('/mes/product/CartogramProcedure?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
          <div class="form-unit">
            <span class="mvc-title-left"> 工序明细 </span>
          </div>
          <div>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序条形码" prop="">
                  {{process_info.process_barcode}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序性质" prop="process_nature">
                  {{process_info.process_nature}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序类型" prop="">
                  {{process_info.process_type}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序类别" prop="">
                  {{process_info.pro_produce_name}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序名称" prop="">
                  {{process_info.process_name}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="文件标准号" prop="">
                  {{process_info.subject}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="文件标准名称" prop="">
                  {{process_info.client_filename}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="变更状态" prop="">
                  {{process_info.process_state}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序描述" prop="">
                  <div style="white-space: pre-wrap;">{{process_info.process_des}}</div>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="工序管理岗位" prop="">
                  {{process_info.role}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <el-form-item label="每时能力值" prop="">
                  {{process_info.throughput_hour}}
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="能力单位" prop="">
                  {{process_info.throughput_unit}}
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="24">
                <el-form-item label="能力说明" prop="">
                  {{process_info.throughput_explain}}
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <el-button @click="gotoPage('/mes/product/ProductProDetUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
          <el-button @click="gotoPage('/mes/product/CartogramProcedure?'+vueparams+'')" type='primary' size="mini"><i class='fa fa-reply'></i>返回</el-button>
        </el-form>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'基本信息'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'ProductProDet',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        process_info: {
          process_barcode: null,
          process_nature: null,
          process_type: null,
          pro_produce_name: null,
          process_name: null,
          subject: null,
          client_filename: null,
          process_state: null,
          process_des: null,
          role: null,
          throughput_hour: null,
          throughput_unit: null,
          throughput_explain: null,
        },
        loading: false,
        Container: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "0DE8485F0D57410993D741446A2B0598",
        name: "工艺编辑器右菜单",
        selected: "基本信息"
      }, 'Container', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/mes/product/ProcedureAction/productProDet?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
